﻿using System;

namespace diantou.web
{
    /// <summary>
    /// 管理员视图
    /// </summary>
    /// <typeparam name="viewType"></typeparam>
    abstract class adminView<viewType> : permissionView<viewType>
        where viewType : adminView<viewType>
    {
        protected override bool loadView()
        {
            if (base.loadView())
            {
                if (currentUser.Permission == dataModel.user.permission.Admin) return true;
                AjaxResponse(new fastCSharp.code.cSharp.webView.errorPath { ErrorPath = currentUser.Path.NewFocus });
            }
            return false;
        }
    }
}
